package experiment1_bag;
import java.util.Scanner;
public class chengji {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个百分制成绩: ");
        int score = scanner.nextInt();
        if (score < 0 || score > 100) {
            System.out.println("输入的成绩不合法，请输入 0 - 100 之间的成绩。");
        } else {
            int scoreRange = score / 10;
            switch (scoreRange) {
                case 10:
                    case 9: System.out.println("优秀");break;
                    case 8: System.out.println("良好");break;
                    case 7: System.out.println("中等");break;
                    case 6: System.out.println("及格");break;
                    default: System.out.println("不及格");
                    }
                }
                scanner.close();
            }
        }
